/**
 * 车票订单(TicketOrder)接口
 *
 * @author wuzongbing
 * @since 2025-01-01 21:20:47
 */

import request from '@/utils/request'

export const TicketOrderApi = {
    /**
     *  分页
     * @returns
     */
    getPage: (data) => {
        return request({
            url: '/manage/intercity/ticketOrder/getPage',
            data,
            method: 'post'
        })
    },

    /**
     *  查询列表
     * @returns
     */
    getList: (data) => {
        return request({
            url: '/manage/intercity/ticketOrder/getList',
            data,
            method: 'post'
        })
    },

    /**
     *  查询详细
     * @returns
     */
    load: (id) => {
        return request({
            url: '/manage/intercity/ticketOrder/load',
            params: {id},
            method: 'get'
        })
    },

    /**
     *  订单详细
     * @returns
     */
    getDetail: (orderNo) => {
        return request({
            url: '/manage/intercity/ticketOrder/getDetail',
            params: {orderNo},
            method: 'get'
        })
    },

    /**
     *  插入
     * @returns
     */
    create: (data) => {
        return request({
            url: '/manage/intercity/ticketOrder/create',
            data,
            method: 'post'
        })
    },

    /**
     *  改签
     * @returns
     */
    change: (data) => {
        return request({
            url: '/manage/intercity/ticketOrder/change',
            data,
            method: 'post'
        })
    },

    /**
     *  更新
     * @returns
     */
    editServiceRemark: (data) => {
        return request({
            url: '/manage/intercity/ticketOrder/editServiceRemark',
            data,
            method: 'post'
        })
    },

    /**
     *  查看联系人手机号
     * @returns
     */
    lookContactsPhone: (orderNo) => {
        return request({
            url: '/manage/intercity/ticketOrder/lookContactsPhone',
            params:{orderNo},
            method: 'get'
        })
    },

    /**
     *  查看下单人手机号
     * @returns
     */
    lookUserPhone: (orderNo) => {
        return request({
            url: '/manage/intercity/ticketOrder/lookUserPhone',
            params:{orderNo},
            method: 'get'
        })
    },

    /**
     *  查看下单人手机号
     * @returns
     */
    lookPassengerPhone: (orderPassnegerId) => {
        return request({
            url: '/manage/intercity/ticketOrder/lookPassengerPhone',
            data:{id:orderPassnegerId},
            method: 'post'
        })
    },

    /**
     *  删除
     * @returns
     */
    cancel: (data) => {
        return request({
            url: '/manage/intercity/ticketOrder/cancel',
            data,
            method: 'post'
        })
    },
    /**
     *  获取下单配置
     * @returns
     */
    getTakeOrderConfig: (arrangeSectionCode) => {
        return request({
            url: '/manage/intercity/ticketOrder/getTakeOrderConfig',
            params: {arrangeSectionCode},
            method: 'get'
        })
    },
}

